package com.yt.common.enums;

/**
 * @Description ：
 * @Author ： 解风
 * @Date ： 2017/09/13 17:21
 */
public enum CodeEnum {
    /********************系统模块*********************/
    FAIL_HYSTRIX(-1, "服务器忙请稍后再试"),
    SUCCESS(0, "成功！"),
    FAIL(1, "失败！"),
    FAIL_2(2, "登录失效，请重新登录"),
    FAIL_3(3, "您无权限访问，请联系管理员"),
    FAIL_4(4, "商城模板未设置，请联系管理员"),
    FAIL_100001(100001, "程序错误，请联系管理员！"),
    FAIL_100002(100002, "请求错误，请联系管理员！"),
    FAIL_100003(100003, "网络异常"),
    FAIL_100004(100004, "签名错误，请联系管理员"),
    FAIL_100005(100005, "服务器繁忙，请稍后重试！"),
    FAIL_100006(100006, "文件上传失败，请重新上传！"),
    FAIL_100007(100007, "添加失败"),
    FAIL_100008(100008, "修改失败"),
    FAIL_100009(100009, "删除失败"),
    FAIL_100011(100011, "保存失败"),

    FAIL_100012(100012, "批量添加失败"),
    FAIL_100013(100013, "批量删除失败"),

    FAIL_100014(100014, "审核失败"),
    FAIL_100015(100015, "导入失败"),
    FAIL_100016(100016, "批量删除失败"),
    FAIL_100017(100017, "订单已确认，无法修改价格"),
    FAIL_100018(100018, "实付价格不能大于商品总价,修改失败!"),
    FAIL_100019(100019, "登录失败!"),
    FAIL_100020(100020, "合同编号已经存在"),


    FAIL_100031(100031, "热词数量不能超过五个"),
    FAIL_100032(100032, "不能设置相同的热词"),
    FAIL_100033(100033, "未添加排序"),
    FAIL_100034(100034, "发送邮件失败！"),
    FAIL_100035(100035, "你已经收藏过了！请勿重复收藏"),
    FAIL_100036(100036, "没有找到该用户"),
    FAIL_100037(100037, "已经是您的会员了，请勿重复添加"),
    FAIL_100038(100038, "你已经被加入开店黑名单，无法提交开店申请，请联系管理员"),
    FAIL_100039(100039, "您没有电子签章，开店前需申请电子签章"),
    FAIL_100040(100040, "存在尚未处理完成的事件，无法关店"),
    FAIL_100041(100041, "该资质正在审核中，无法重复提交"),
    FAIL_100042(100042, "您尚未签订入驻协议"),
    FAIL_100043(100043, "该品牌已经存在，请输入其他品牌"),
    FAIL_100044(100044, "保证金余额不足，无法扣除"),
    FAIL_100045(100045, "该店铺不存在此会员"),
    FAIL_100046(100046, "您已经审核过了，请勿重复审核"),
    FAIL_100047(100047, "开户银行地址错误"),
    FAIL_100048(100048, "该店铺还未关店，无法退还保证金"),
    FAIL_100049(100049, "该店铺已经进入关店流程中，请勿重复关店"),
    FAIL_100050(100050, "该模板为默认模板，不能删除！"),
    FAIL_100051(100051, "暂无活动模板信息，删除失败!"),
    FAIL_100052(100052, "您有未通过的项目"),
    FAIL_1000530(000530, "请选择正确的通道"),



    FAIL_10001600(10001600, "导入数据中有重复"),
    FAIL_100053(100053, "店铺异常或者账号异常，请联系管理员！"),
    FAIL_100054(100054, "报价失败，请稍后重试"),
    FAIL_100055(100055, "报价已结束或已取消"),
    FAIL_100056(100056, "该品牌您不能报价"),
    FAIL_100057(100057, "您暂无权操作"),
    FAIL_100058(100058, "询价已结束，请勿重复操作"),
    FAIL_100059(100059, "取消失败"),
    FAIL_100060(100060, "您已申请，请勿重复操作"),
    FAIL_100061(100061, "操作失败，请稍后重试"),
    FAIL_100062(100062, "报价已流标或已取消"),
    FAIL_100063(100063, "购买失败"),
    FAIL_100064(100064, "申请平台砍价中，暂不能报价"),
    FAIL_100065(100065, "加入购物车失败，请稍稍重试"),
    FAIL_100066(100066, "您已申请平台砍价"),
    FAIL_100067(100067, "代客下单失败，请稍后重试"),
    FAIL_100068(100068, "佣金读取错误，请稍后重试"),
    FAIL_100069(100044, "设置保证金不能低于保证金余额，请先解冻"),
    FAIL_100070(100070, "免费议价服务次数错误，请稍后重试"),
    FAIL_100071(100071, "金额不能低于开票最低金额"),
    FAIL_100072(100072, "导入询价单失败各种情况"),
    FAIL_100073(100073, "金额设置错误"),
    FAIL_100074(100074, "店铺已重设付款方式，请刷新页面再进行确认！"),
    FAIL_100075(100075, "支付类型已确认，您无法再进行设置！"),
    FAIL_100076(100076, "付款比例设置有误"),
    FAIL_100077(100077, "退款佣金修改失败"),

    ORDER_NUM_ERROR(300020, "最多只能批量确认5个订单！"),
    AFTER_SALE_ORDER_ERROR_320007(320007, "售后申请退款金额大于实际付款金额!"),
    FAIL_Send_1010(1010, "发送短信失败"),

    /********************用户模块*********************/
    FAIL_USER_200000(200000, "账号或密码错误"),
    FAIL_USER_200001(200001, "旧密码错误"),
    FAIL_USER_200002(200002, "账号已存在"),
    FAIL_USER_200003(200003, "账号不存在"),
    FAIL_USER_200004(200004, "账号已被停用"),
    FAIL_USER_200005(200005, "邮箱尚未激活"),
    FAIL_USER_200006(200006, "密码不正确"),


    /********************订单模块*********************/
    FAIL_ORDER_300000(300000, "当前订单未审核"),
    FAIL_ORDER_300001(300001, "用户id为空"),
    FAIL_ORDER_300002(300002, "订单已存在"),
    FAIL_ORDER_300003(300003, "图片数量小于3"),
    FAIL_ORDER_300004(300004, "当前订单状态不允许修改"),
    FAIL_ORDER_300005(300005, "订单已成交状态只能修改为已完结状态"),
    FAIL_ORDER_300006(300006, "订单未审核状态只能修改为审核通过状态或未审核通过状态"),
    FAIL_ORDER_300007(300007, "订单审核通过状态只能修改为未审核状态或已成交状态"),
    FAIL_ORDER_300008(300002, "订单创建失败"),
    FAIL_ORDER_300009(300002, "订单确认失败"),
    FAIL_ORDER_300010(300010, "订单签收失败！"),
    FAIL_ORDER_300012(300012, "砍价服务费有误，请联系管理员！"),

    FAIL_ORDER_CONTACT_SIGN_ERROR(300011, "合同已经签署，不能重复签署"),
    ORDER_REPETITION_CANCEL(300012, "订单取消失败"),
    ORDER_BUYER_NO_SIGN(300013, "有订单未签署合同或者合同状态尚未改变。如已签订合同，最迟30分钟合同状态将会改变"),
    ORDER_PAY_NOT_STATE(300014, "订单状态异常，请检测订单状态!"),
    ORDER_COMMISSION_PAY(300015, "支付失败，请重新刷新信息!"),
    ORDER_SURE_ERROR(300016, "等待卖家报价!"),
    ELECTRONIC_RECEIPT_QUERY_FAILED(300017, "未查询到电子回单!"),
    FAIL_ORDER_300018(300018, "订单支付中，请稍后刷新页面再重试或联系管理员！"),

    /*****************************售后订单模块****************************************/
    AFTER_SALE_ORDER_ERROR_320000(320000, "操作失败,请稍后重试！"),
    AFTER_SALE_ORDER_ERROR_320001(320001, "暂未查询到您的售后订单信息！"),
    AFTER_SALE_ORDER_ERROR_320002(320002, "请勿重复操作！"),
    AFTER_SALE_ORDER_ERROR_320003(320003, "卖家已同意您的售后申请，暂无法取消!"),
    AFTER_SALE_ORDER_ERROR_320004(320004, "售后申请审核已通过,无法修改!"),
    AFTER_SALE_ORDER_ERROR_320005(320005, "售后申请提交数量大于购买数量!"),
    AFTER_SALE_ORDER_ERROR_320006(320006, "您有未完成的售后订单，暂不能签收!"),
    /************************************发票模块***********************************************/
    ORDER_INVOICE_ERROR_520000(520000, "暂无发票信息!"),
    ORDER_INVOICE_ERROR_520001(520001, "发票下载失败!"),
    FAIL_COMMODITY_AUDIT_330200(330200, "合同url返回失败请联系管理员"),

    FAIL_ORDER_SHIP_320000(310000, "您的订单已发货，请勿重复提交!"),
    FAIL_ORDER_SHIP_320001(310001, "您的订单发货失败!"),
    FAIL_ORDER_SHIP_320002(310002, "售后订单取消失败!"),

    FAIL_ORDER_CONTACT_310003(310003, "签署失败!"),
    FAIL_ORDER_BUYER_NO_SIGN_CONTACT_310004(310004, "买家未签订合同!"),
    FAIL_UPDATE_CONTACT_310005(310005, "修改失败，请检测买家是否已经签订了合同!"),
    FAIL_UPDATE_CONTACT_310006(310006, "您已签到!"),
    FAIL_COMMODITY_AUDIT_330100(330100, "合同生成失败：开户失败，请至“个人中心—我的钱包”中查看开户状态并开户！"),
    /*************商品审核*******************/
    FAIL_COMMODITY_AUDIT_330000(330000, "商品审核失败!"),
    /**************商品模块****************/
    FAIL_COMMODITY_ERROR_340000(340000, "暂无此信息!"),
    FAIL_COMMODITY_ERROR_340001(340001, "操作失败，此商品暂未审核或审核未通过!"),
    FAIL_COMMODITY_ERROR_340002(340002, "操作失败，此商品已违规，由平台下架!"),
    FAIL_COMMODITY_ERROR_340003(340003, "商品上架失败，请稍后重试!"),
    FAIL_COMMODITY_ERROR_340004(340004, "商品下架失败，请稍后重试!"),
    FAIL_COMMODITY_ERROR_340005(340005, "商品信息上传失败，请稍后重试!"),
    FAIL_COMMODITY_ERROR_340006(340006, "商品信息修改失败，请稍后重试!"),
    FAIL_COMMODITY_ERROR_340007(340007, "商品已上架，不能删除!"),
    FAIL_COMMODITY_ERROR_340008(340008, "商品恢复失败!"),
    FAIL_COMMODITY_ERROR_340009(340009, "商品审核失败!"),
    FAIL_COMMODITY_ERROR_340010(340010, "只有最顶级类目才能添加筛选属性，请修改类目等级!"),
    FAIL_COMMODITY_ERROR_340011(340011, "只有最顶级类目才能添加单位信息，请修改类目等级!"),
    FAIL_COMMODITY_ERROR_340012(340012, "只有最顶级类目才能添加参数信息，请修改类目等级!"),
    FAIL_COMMODITY_ERROR_340013(340013, "您的品牌部分资质已过期,商品无法上架!"),
    FAIL_COMMODITY_ERROR_340014(340014, "该类目父级属于最终级类目,包含有属性信息,请更改父级类目!"),
    FAIL_COMMODITY_ERROR_340015(340015, "店铺已被冻结,暂时无法操作商品!"),
    FAIL_COMMODITY_ERROR_340016(340016, "产品由于违规被平台删除,暂无法恢复!"),
    FAIL_COMMODITY_ERROR_340017(340017, "该商品初始品牌／类目，与现店铺品牌／类目不一致。"),
    /********************文件模块*********************/
    FAIL_FILE_400000(400000, "上传文件为空"),
    FAIL_FILE_400001(400001, "保存文件失败"),
    FAIL_FILE_400002(400002, "当前文件配置对象不存在"),
    //excel上传 400003
    FAIL_FILE_400004(400004, "上传文件数组格式不一致"),
    FAIL_FILE_400005(400005, "文件路径为空"),
    FAIL_FILE_400006(400006, "文件账号错误"),
    FAIL_FILE_400007(400007, "请上传JPG、JPEG或者PNG图片！"),
    FAIL_FILE_400008(400008, "请设置水印！"),
    FAIL_FILE_400009(400009, "您的存储空间已满，请联系管理员！"),
    FAIL_FILE_400010(400010, "请上传png,gif,jpeg,jpg,pdf,ppt,xls,xlsx,pptx,doc,docx,mp3,mp4,flv,zip,rar等文件！"),

    /********************登录模块*********************/
    FAIL_Login_1001(1001, "公司不存在"),
    FAIL_Login_1002(1002, "用户或密码错误"),
    FAIL_Login_1003(1002, "密码错误"),
    FAIL_Login_1004(1004, "手机验证码错误或已过期"),
    FAIL_Login_1005(1005, "邮箱验证码错误或已过期"),
    FAIL_Login_1006(1006, "验证码错误"),
    FAIL_Login_1007(1007, "验证图片获取失败"),
    FAIL_Login_1008(1008, "滑动验证失败"),
    FAIL_Login_1009(1009, "财务手机验证码错误或已过期"),
    //FAIL_Login_1003(1003, "登录过期"),
    /********************修改密码模块*********************/
    FAIL_Login_2001(2001, "修改密码失败"),
    FAIL_Login_2002(2002, "获取菜单权限错误"),
    FAIL_LOGIN_2003(2003, "旧密码不能为空"),
    FAIL_LOGIN_2004(2004, "新密码不能为空"),
    FAIL_LOGIN_2005(2005, "新密码不能与旧密码相同"),
    /********************添加用户模块*********************/
    FAIL_AddUser_3001(3001, "登录用户已存在"),
    FAIL_AddUser_3002(3002, "角色不能为空"),
    FAIL_AddUser_3003(3003, "角色为空"),
    FAIL_AddUser_3004(3004, "手机号已经注册"),
    FAIL_AddUser_3005(3005, "邮箱已经注册"),
    FAIL_AddUser_3006(3006, "你已经被加入黑名单，请联系管理员"),
    FAIL_AddUser_3007(3007, "公司名已经注册"),
    FAIL_AddUser_3008(3008, "店铺名已经注册"),
    FAIL_AddUser_3009(3009, "二级域名已经注册"),
    FAIL_AddUser_3010(3010, "您的店铺已经开启或您的开店申请正在处理中"),
    FAIL_SHOP_BASIC_CERTIFICATION_EXPIRE_3011(3011, "您的基本资质已经过期"),

    FAIL_User_800001(800001, "sessionId不能为空!"),
    FAIL_User_800002(800002, "sessionId过期，请重新登录!"),

    SHOP_CART_SHOP(1200001, "没有店铺"),
    SHOP_CART_AREA_ERROR(120002, "有商品不在可售区域"),
    SHOP_CART_INVENTORY_ERROR(120003, "商品库存不足"),
    SHOP_CART_NO_BUYER(1200004, "没有买家"),
    SHOP_CART_NOT_MY_COMMODITY(1200005, "不能购买自己的商品"),
    SHOP_CART_COMMODITY_NOT_PUBLIC(1200006, "有商品已经下架"),
    SHOP_FREEZE(1200007, "您选择的商品有存在店铺异常情况"),
    SHOP_HOME_FREEZE(1200008, "此店铺已经冻结"),
    SHOP_UPDATE_ERROR(1200009, "只有旗舰店或专卖店可变更类型"),
    SHOP_UPDATE_TIME_ERROR(1200010, "店铺一年只可变更一次"),
    SHOP_COMMODITY_ORDER_ERROR(1200011, "您有包含询价商品的订单未支付，请支付或取消相关订单后再下单！"),
    /***************首页错误****************/
    EPG_SERVICE_ERROR(1400001, "已存在置顶咨询"),

    FAIL_200001(200001, "已进件，请勿重新进件"),
    FAIL_200002(200002, "中金开户失败"),
    FAIL_200003(200003, "资金账户不存在"),
    FAIL_200004(200004, "销户失败"),
    FAIL_200005(200005, "账户信息变更失败"),

    FAIL_200006(200006, "绑卡失败"),
    FAIL_200007(200007, "更改绑卡失败"),
    FAIL_200008(200008, "解绑失败"),
    FAIL_200009(200009, "账户信息变更失败"),
    FAIL_200010(200010, "获取余额失败"),
    FAIL_200011(200011, "获取交易流水失败"),

    FAIL_200012(200012, "需人工审核激活"),
    FAIL_200013(200013, "需要短信验证"),
    FAIL_200014(200014, "需要打款验证（被动打款）"),
    FAIL_200015(200015, "需要异步网关确认"),
    FAIL_200016(200016, "保存失败，请联系平台客服"),
    FAIL_200017(200017, "激活失败"),
    FAIL_200018(200018, "充值失败"),
    FAIL_200019(200019, "提现失败"),
    FAIL_200020(200020, "冻结失败"),
    FAIL_200021(200021, "解冻失败"),
    FAIL_200022(200022, "支付失败"),
    FAIL_200023(200023, "已支付，请勿重复支付"),
    FAIL_200024(200024, "退款失败"),
    FAIL_200025(200025, "交易金额不等于子订单金额之和"),
    FAIL_200026(200026, "支付信息有误"),
    FAIL_200027(200027, "无此记录"),
    FAIL_200028(200028, "余额不足"),
    FAIL_200029(200029, "您尚未开户"),
    FAIL_200030(200030, "您暂不能支付，请联系管理员"),
    FAIL_200031(200031, "金额错误，请联系管理员"),
    FAIL_200032(200032, "已缴纳，请勿重复操作"),
    ACTIVE_TIPS(200033, "您已经多次输入错误值，中金支付有限公司即将再次向您的账户进行一次打款，请耐心等待查询。为避免造成您的账户无法激活，请确认此次收到的款项金额后，谨慎填入激活！"),
    FAIL_200034(200034, "修改不可提现金额失败！"),
    FAIL_200035(200035, "中金服务器出错！"),
    FAIL_200036(200036, "该订单不能使用票据支付！"),
    FAIL_200037(200037, "票据信息不能为空！"),
    FAIL_200038(200038, "暂无票据支付！"),
    FAIL_200039(200039, "佣金退款计算错误！"),
    FAIL_200040(200040, "支付中，请刷新页面！"),
    FAIL_200041(200041, "添加物流账单发票信息失败！"),
    FAIL_200042(200042, "未激活"),

    FAIL_DEPPON_400001(400001, "访问德邦服务异常！"),
    FAIL_DEPPON_400002(400002, "发货失败！"),
    FAIL_DEPPON_400003(400003, "信用额度不足！"),
    FAIL_DEPPON_400004(400004, "您不是月结用户，请申请月结用户！"),
    FAIL_DEPPON_400005(400005, "您账号异常，请确定月账单是否已支付！"),
    FAIL_DEPPON_400006(400006, "渠道号错误，未找到数据！"),
    FAIL_DEPPON_400007(400007, "您此次发货金额超过月结额度，您可以联系客服修改您的月结额度或者采用现结方式发货！"),
    FAIL_DEPPON_400008(400008, "回调业务处理异常"),
    FAIL_DEPPON_400009(400009, "excel无数据"),
    FAIL_DEPPON_400010(400010, "解析excel错误"),
    FAIL_DEPPON_400011(400011, "数据不对"),
    FAIL_DEPPON_400012(400012, "已生成账单，请勿重复生成"),




    /*******************权限提示*********************/
    SHOP_MANAGE_AUTH_NAME(120000, "无店铺管理权限"),
    PRODUCT_MANAGE_AUTH_NAME(120001, "无产品管理权限"),
    BUY_COMMODITY_AUTH_NAME(120002, "无购买商品权限"),
    ORDER_PAY_AUTH_NAME(120003, "无订单支付权限"),
    IM_ADVISORY_AUTH_NAME(120004, "无im咨询权限"),


    /********************契约锁*********************/
    QIYUESUO_COMPANYAUTH_SAME_SUCCESS(130000, "此公司已经认证，认证已通过"),
    QIYUESUO_COMPANYAUTH_SAME(130001, "此公司已验证，认证信息与当前中铁工服不一致，请联系平台客服"),
    QIYUESUO_FAIL(130002, "契约锁企业验证请求异常"),
    CONTACT_SEAL_ERROR(130003, "未进行企业验证"),
    /************装修验证*******/
    RENOVATION_FAIL(30024, "跳转地址不合规，不允许使用外部地址，请检查更改"),


    /***********物流查询错误信息***********/
    WULIU_ERROR(50001, "暂未查到与您单号相关的物流信息，请稍后再尝试。"),
    /**
     * 序号
     **/
    SORT_FAIL(40001, "已到达排序最顶部!"),
    SORT_FAIL_A(40002, "已到达最大排序号!");
    private int code;
    private String msg;

    CodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static Boolean isSuccess(int code) {

        return SUCCESS.getCode() == code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
